package edu.uoc.tdp.pac4.connexiomanteniment.exceptions;

import edu.uoc.tdp.pac4.connexiomanteniment.gui.*;
import edu.uoc.tdp.pac4.connexiomanteniment.i18n.*;


public class ExceptionConnexioManteniment extends Exception {
	public static final long serialVersionUID = 3L;
	String codiError;
	
	public ExceptionConnexioManteniment() {}
	public ExceptionConnexioManteniment(String pCodiError) {
		this();
		setErrorCode(pCodiError);
		PantallaError pe = new PantallaError();
		pe.setErrorMessage(this.getLocalizedMessage());
		pe.setVisible(true);
	}
	public void setErrorCode(String pCodiError) { codiError = pCodiError; }
	public String getErrorCode() { return codiError; }
	public String getLocalizedMessage() {
		LanguageUtils.setDefaultLanguage("i18n/messagesConnexioManteniment");
		return LanguageUtils.getMessage(codiError);
	}
	
}